Matching re-occuring value within patterns#58
Open
muellpanda wants to merge 6 commits into
Open
Conversation
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
==========================================
+ Coverage 89.43% 89.95% +0.52%
==========================================
Files 13 14 +1
Lines 937 996 +59
==========================================
+ Hits 838 896 +58
- Misses 99 100 +1
Continue to review full report at Codecov.
|
|
|
Contributor
|
@muellpanda would you please resolve the conflicts. we would like to verify the changes and see if this can be merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We propose a solution to evaluate our so called inter-observable patterns described in Issue #57.
I will try to describe what our code changes do:
exitPropTestRegex-function. Whenever a regex containing a variable is successfully matched against an Observable object, we store the variable name, Observable ID and actual value the variable matched on in a nested dictionary (interobs_group_matches). Example: we have the pattern[file:name MATCHES '(?P<var>[a-z]{3})], a File-Observable with filename 'foo' and one with filename 'bar'.interobs_group_matcheswill look like this:{'var': {0: ['foo'], 1: ['bar']}}.interobs_group_matchesand remove all values of irrelevant SDOs. Then run the checks on this copy. If a check returnsfalse, remove the current binding fromfound_bindings-- it does not fulfill the inter-observable pattern.Our changes to the code are as transparent as possible to the original functionality of the matcher. We also added a small test to evaluate the functionality of inter-observable patterns.